home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 039a / pdm_106.zip / PDMDEMO2.PRG < prev    next >
Text File  |  1991-06-08  |  11KB  |  298 lines

  1.  
  2. *≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡*
  3. * Program Name: PDMDEMO2.PRG
  4. * Description.: Driver for PDM Menu System program
  5. * Language....: Clipper S'87
  6. * LIB required: CC.LIB v1.04, EXTEND.LIB
  7. * Gen Time....: 06/08/91 17:58:59
  8. * Generated by: PDM Sys - the ClipCode Pull Down Menu System  v1.06
  9. *≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡*
  10. *** Set CLIPPER Environment ***
  11. SET CURSOR OFF
  12. SET DELETED ON                          && Filter out Deleted Records
  13. SET EXACT ON
  14. SET SCOREBOARD OFF
  15. SET SOFTSEEK OFF
  16.  
  17. PDMSETUP()
  18.  
  19. *** Set Color for Initial Screen ***
  20. SET COLOR TO ( PDM_CONFG[7] )
  21. @1,0 SAY REPLICATE( CHR( PDM_CONFG[8] ), 1840 ) && char for init screen
  22.  
  23. SET COLOR TO ( PDM_COLOR[1] )           && hcolor when not selected
  24. @ PDM_CONFG[2],00
  25.  
  26. SET COLOR TO ( PDM_CONFG[6] )           && color for init bottom panel
  27. @ PDM_CONFG[4],00
  28. @ PDM_CONFG[4],00 SAY PDM_CONFG[9]      && text for init bottom panel
  29.  
  30. MENUPD( 0, 0 )                          && just display h menu
  31.  
  32. PRIVATE key, hOpt, vOpt, pdSEL, sv_panel
  33. pdSel= 1
  34. DO WHILE .T.
  35.  
  36.   *SETCANCEL(.F.)                        && Disable alt-C interrupt
  37.   INKEY(0)
  38.   key= LASTKEY()                        && key= INKEY(0) misses alt-D
  39.   *SETCANCEL(.T.)                        && Enable alt-C interrupt
  40.  
  41.   DO CASE
  42.   *?*CASE key = 28                         && F1=Help
  43.  
  44.   *?*CASE key = -2                         && F3=Exit
  45.   ***  EXIT2DOS()
  46.  
  47.   CASE key = 27                         && Exit
  48.     PRIVATE Opts[2]
  49.     Opts[1]= "Yes"
  50.     Opts[2]= "No"
  51.      * Syntx: message text,       [ title,prmpts,colors,mRow,mColm,TmO ]
  52.     IF BOXMSG( "Exit Program to DOS?",.F., Opts ) = 1
  53.       EXIT
  54.     ELSE
  55.       LOOP
  56.     ENDIF
  57.   CASE key = -9                         && F10=Menu
  58.     hOpt=  1
  59.     vOpt=  0
  60.   *?*CASE key = 3                          && PgDn=Next
  61.   ***  SKIP 1
  62.   ***  IF EOF()
  63.   ***    BOXMSG( "At End-of-File" )
  64.   ***    SKIP -1
  65.   ***  ENDIF
  66.   *?*CASE key = 18                         && PgUp=Prev
  67.   ***  SKIP -1
  68.   ***  IF BOF()
  69.   ***    BOXMSG( "At Beginning-of-File" )
  70.   ***  ENDIF
  71.  
  72.   CASE ASCAN( PDM_HOTKY, key ) > 0      && If found, returns the ss
  73.     hOpt=  ASCAN( PDM_HOTKY, key )
  74.     vOpt=  1
  75.   OTHERWISE
  76.     LOOP
  77.   ENDCASE
  78.  
  79.   IF hOpt < 1
  80.     LOOP
  81.   ENDIF
  82.  
  83.   sv_panel= BOXSAVE( PDM_CONFG[4],00, PDM_CONFG[4],79 )
  84.   pdSel   = 1
  85.   DO WHILE pdSel <> 0
  86.  
  87.     pdSel= MENUPD( @hOpt, @vOpt )
  88.     IF pdSel > 0
  89.       DO CASE
  90.       OTHERWISE
  91.         * Syntx: message text/array, [ title,prmpts,colors,mRow,mColm,TmO ]
  92.         BOXMSG( "PDM Option Selected: "+LTRIM( STR(pdSel) ) )
  93.       ENDCASE
  94.     ENDIF
  95.   ENDDO WHILE pdSel <> 0
  96.   BOXREST( sv_panel )
  97.  
  98. ENDDO
  99. SET COLOR TO
  100. SET CURSOR ON
  101. CLEAR
  102. QUIT                                                    && End of: MAIN LINE
  103. *≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡*
  104.  
  105. *------------------------------------------------------------------------------*
  106. * Function....: PDMSETUP()
  107. * Purpose.....: UDF to Create PDMSETUP()
  108. * Parameters..: none
  109. * Generated by: PDM - the ClipCode Pull Down Menu System
  110. * Assumption..: the presence of these PUBLIC arrays:
  111. *             : <arrC>: PDM_HPROM = horizontal menu prompt text
  112. *             : <arrN>: PDM_HCOLM = horizontal starting columns for prompts
  113. *             : <arrC>: PDM_HTRIG = horizontal trigger letters
  114. *             : <arrN>: PDM_HTPOS = horizontal trigger letter positions
  115. *             : <arrN>: PDM_VSS1  = starting array subscript
  116. *             : <arrN>: PDM_VSS2  = ending array subscript
  117. *             : <arrC>: PDM_VPROM = vertical menu prompt text
  118. *             : <arrC>: PDM_VTRIG = vertical trigger letters
  119. *             : <arrN>: PDM_VCOLM = vertical starting columns for v prompts
  120. *             : <arrN>: PDM_VTPOS = vertical trigger letter positions
  121. *             : <arrL>: PDM_VACTV = vertical active status array
  122. *             : <arrC>: PDM_COLOR = PDM color strings for SET COLOR TO
  123. *                                     [ 1] hcolor when not selected
  124. *                                     [ 2] hcolor for unselected trigger
  125. *                                     [ 3] hcolor for selected option
  126. *                                     [ 4] hcolor for selected trigger
  127. *                                     [ 5] vcolor for box
  128. *                                     [ 6] vcolor when not selected
  129. *                                     [ 7] vcolor for unselected trigger
  130. *                                     [ 8] vcolor for selected option
  131. *                                     [ 9] vcolor for selected trigger
  132. *                                     [10] vcolor for inactive option
  133. *                                     [11] vcolor for message row
  134. *             : <arrC>: PDM_VMSSG = vertical message help text
  135. *             : <arrX>: PDM_CONFG = PDM configuration
  136. *                                     [1] = expN: box type: 0,1,2
  137. *                                     [2] = expN: row for horiz menu
  138. *                                     [3] = expN: row for box top
  139. *                                     [4] = expN: message row
  140. *                                     [5] = expN: time out
  141. *                                     [6] = expC: color for init bottom panel
  142. *                                     [7] = expC: color for init screen
  143. *                                     [8] = expN: char for init screen
  144. *                                     [9] = expC: text for init bottom panel
  145. * Calls.......: PDM_INIT()
  146. * CC.LIB Calls: ALONGEST(), ATNEXT()
  147. * Language....: Clipper S'87
  148. * Returns.....: <expL>: .T.
  149. *------------------------------------------------------------------------------*
  150. FUNCTION PDMSETUP
  151.  
  152. PRIVATE dimh, dimv, ss
  153.  
  154. *** MENUPD Horizontal ***
  155. dimh= 5
  156. PUBLIC PDM_HPROM[dimh]                  && horizontal menu prompt text
  157. PDM_HPROM[1]= " File "
  158. PDM_HPROM[2]= " Edit "
  159. PDM_HPROM[3]= " System "
  160. PDM_HPROM[4]= " Help "
  161. PDM_HPROM[5]= " Quit "
  162.  
  163. PUBLIC PDM_HCOLM[dimh]                  && horizontal starting columns for prompts
  164. PDM_HCOLM[1]= 1
  165. PDM_HCOLM[2]= 7
  166. PDM_HCOLM[3]= 13
  167. PDM_HCOLM[4]= 21
  168. PDM_HCOLM[5]= 27
  169.  
  170. PUBLIC PDM_HOTKY[dimh]                  && horiz Hot/alt keys INKEY()
  171. PDM_HOTKY[1]= 289
  172. PDM_HOTKY[2]= 274
  173. PDM_HOTKY[3]= 287
  174. PDM_HOTKY[4]= 291
  175. PDM_HOTKY[5]= 272
  176.  
  177. PUBLIC PDM_HTRIG[dimh]                  && horizontal trigger letters
  178. PDM_HTRIG[1]= "F"
  179. PDM_HTRIG[2]= "E"
  180. PDM_HTRIG[3]= "S"
  181. PDM_HTRIG[4]= "H"
  182. PDM_HTRIG[5]= "Q"
  183.  
  184. PUBLIC PDM_HTPOS[dimh]                  && horizontal trigger letter  positions
  185. PDM_HTPOS[1]= 2
  186. PDM_HTPOS[2]= 2
  187. PDM_HTPOS[3]= 2
  188. PDM_HTPOS[4]= 2
  189. PDM_HTPOS[5]= 2
  190.  
  191. *** PDMENUV Vertical ***
  192. PUBLIC PDM_VSS1[dimh]                   && starting array subscript
  193. PDM_VSS1[1]= 1
  194. PDM_VSS1[2]= 7
  195. PDM_VSS1[3]= 9
  196. PDM_VSS1[4]= 11
  197. PDM_VSS1[5]= 14
  198.  
  199. dimv= 14
  200. PUBLIC PDM_VPROM[dimv]                  && vertical menu prompt text
  201. PDM_VPROM[ 1]= " Roll Summary File  "
  202. PDM_VPROM[ 2]= " Defect Master File "
  203. PDM_VPROM[ 3]= " Style Master File  "
  204. PDM_VPROM[ 4]= " Control File       "
  205. PDM_VPROM[ 5]= "-"
  206. PDM_VPROM[ 6]= " Parameters File    "
  207. PDM_VPROM[ 7]= " Time & Date "
  208. PDM_VPROM[ 8]= " Environment "
  209. PDM_VPROM[ 9]= " Monitor Type  "
  210. PDM_VPROM[10]= " Keyboard Type "
  211. PDM_VPROM[11]= " Message Queue   "
  212. PDM_VPROM[12]= " Help Text       "
  213. PDM_VPROM[13]= " Key assignments "
  214. PDM_VPROM[14]= " Exit Program "
  215.  
  216. PUBLIC PDM_VTRIG[dimv]                  && vertical trigger letters
  217. PDM_VTRIG[ 1]= "R"
  218. PDM_VTRIG[ 2]= "D"
  219. PDM_VTRIG[ 3]= "S"
  220. PDM_VTRIG[ 4]= "C"
  221. PDM_VTRIG[ 5]= "-"
  222. PDM_VTRIG[ 6]= "P"
  223. PDM_VTRIG[ 7]= "T"
  224. PDM_VTRIG[ 8]= "E"
  225. PDM_VTRIG[ 9]= "M"
  226. PDM_VTRIG[10]= "K"
  227. PDM_VTRIG[11]= "M"
  228. PDM_VTRIG[12]= "H"
  229. PDM_VTRIG[13]= "K"
  230. PDM_VTRIG[14]= "E"
  231.  
  232. PUBLIC PDM_VTPOS[dimv]                  && vertical trigger letter positions
  233. PDM_VTPOS[ 1]= 2
  234. PDM_VTPOS[ 2]= 2
  235. PDM_VTPOS[ 3]= 2
  236. PDM_VTPOS[ 4]= 2
  237. PDM_VTPOS[ 5]= 1
  238. PDM_VTPOS[ 6]= 2
  239. PDM_VTPOS[ 7]= 2
  240. PDM_VTPOS[ 8]= 2
  241. PDM_VTPOS[ 9]= 2
  242. PDM_VTPOS[10]= 2
  243. PDM_VTPOS[11]= 2
  244. PDM_VTPOS[12]= 2
  245. PDM_VTPOS[13]= 2
  246. PDM_VTPOS[14]= 2
  247.  
  248. PUBLIC PDM_VACTV[dimv]                  && vertical active status array
  249. AFILL( PDM_VACTV, .T. )
  250. PDM_VACTV[ 4]= .F.
  251. PDM_VACTV[ 5]= .F.
  252.  
  253. PUBLIC PDM_VMSSG[dimv]                  && vertical message help text
  254. PDM_VMSSG[ 1]= "View the Roll Summary File"
  255. PDM_VMSSG[ 2]= "View the Defect Master File"
  256. PDM_VMSSG[ 3]= "View the Style Master File"
  257. PDM_VMSSG[ 4]= "View the System Control File (SysOp Security required)"
  258. PDM_VMSSG[ 5]= "-"
  259. PDM_VMSSG[ 6]= "View Parameters File"
  260. PDM_VMSSG[ 7]= "Update the System Time & Date"
  261. PDM_VMSSG[ 8]= "Modify System Environment variables"
  262. PDM_VMSSG[ 9]= "Specify Color of Monochrome Monitor Type"
  263. PDM_VMSSG[10]= "Specify Keyboard Type"
  264. PDM_VMSSG[11]= "Display System Message Log"
  265. PDM_VMSSG[12]= "Display Indexed Help Text"
  266. PDM_VMSSG[13]= "View Key assignments"
  267. PDM_VMSSG[14]= "Exit to DOS command prompt"
  268.  
  269. PUBLIC PDM_COLOR[11]                    && PDM color strings for SET COLOR TO
  270. PDM_COLOR[ 1]= "B/W"                     && [ 1] hcolor when not selected
  271. PDM_COLOR[ 2]= "B+/W"                    && [ 2] hcolor for unselected trigger
  272. PDM_COLOR[ 3]= "W+/R"                    && [ 3] hcolor for selected option
  273. PDM_COLOR[ 4]= "W+/R"                    && [ 4] hcolor for selected trigger
  274. PDM_COLOR[ 5]= "W+/B"                    && [ 5] vcolor for box
  275. PDM_COLOR[ 6]= "W/B"                     && [ 6] vcolor when not selected
  276. PDM_COLOR[ 7]= "W+/B"                    && [ 7] vcolor for unselected trigger
  277. PDM_COLOR[ 8]= "R/W"                     && [ 8] vcolor for selected option
  278. PDM_COLOR[ 9]= "R/W"                     && [ 9] vcolor for selected trigger
  279. PDM_COLOR[10]= "R/B"                     && [10] vcolor for inactive option
  280. PDM_COLOR[11]= "N/W"                     && [11] vcolor for message row
  281.  
  282. PUBLIC PDM_CONFG[9]                     && PDM configuration
  283. PDM_CONFG[1]= 1                          && [1] = expN: box type: 0,1,2
  284. PDM_CONFG[2]= 0                          && [2] = expN: row for horiz menu
  285. PDM_CONFG[3]= 2                          && [3] = expN: row for box top
  286. PDM_CONFG[4]= 24                         && [4] = expN: message row
  287. PDM_CONFG[5]= 0                          && [5] = expN: time out
  288. PDM_CONFG[6]= "N/W"                      && [6] = expC: color for init bottom panel
  289. PDM_CONFG[7]= "W+/B"                     && [7] = expC: color for init screen
  290. PDM_CONFG[8]= 176                        && [8] = expN: char for init screen
  291. *                                        && [9] = expC: text for init bottom panel
  292. PDM_CONFG[9]= " Enter=Select Esc=Cancel F1=Help F10=Menu "
  293.  
  294. PDM_INIT()                    && Initialize remaining optional PDM PUBLIC arrays
  295.  
  296. RETURN .T.                                                 && End of: PDMSETUP()
  297. *------------------------------------------------------------------------------*
  298. *<eof>